HIVE取整和取余

您所在的位置:网站首页 hash 取模 HIVE取整和取余

HIVE取整和取余

#HIVE取整和取余| 来源: 网络整理| 查看: 265

1.四舍五入  round

select round(47.54452) round保留l两位小数。 45.54

2.向下取整 floor

select floro(47.54452)

48

3.向上取整 ceiling

select ceiling(47.54452)

47

4.舍去小数位  cast (可以将字符串类型转变成bigint)

select cast(47.54452)

47

cast(birth AS BIGINT)

5.取余 pmod

pmod(a,b)

a对b去余



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3